<template>
  <DragBoxVue :init="{ x: map.id * 100, y: map.id * 100 }">
    <div class="nowords">{{ map.name }}</div>
  </DragBoxVue>

  <template v-if="map.children">
    <div v-for="(item, index) in map.children" :key="index">
      <MindMapNode :map="item" />
    </div>
  </template>
</template>

<script>
import DragBoxVue from '../components/DragBox.vue';

/**
 * @description 思维导图节点
 * @author
 *
 *
 */
export default {
  name: 'MindMapNode',
  components: { DragBoxVue },
  props: {
    map: Object,
  },
  data() {
    return {};
  },
  created() {},
  methods: {},
};
</script>

<style scoped>
.nowords {
  text-align: center;
}
</style>
